stylecontext: Revert part of previous commit
authorBenjamin Otte <otte@redhat.com>
Fri, 15 Nov 2013 03:16:33 +0000 (04:16 +0100)
committerBenjamin Otte <otte@redhat.com>
Fri, 15 Nov 2013 03:33:38 +0000 (04:33 +0100)
Commit 719dd636a9da679ea08a9644a8cccfe7d6f145d7 replaces
margin-left/right with margin-start/end. CSS does not have
margin-start/margin-end properties, the sed script was a bit overeager.

Fwiw, CSS implements RTL margin styling via :dir(rtl) selectors.

gtk/gtkstylecontext.c

index d883c9fe9a9d90add220985ba8f95f34b9f93a61..9f35f42c82f6dd18f480b1db1e963cf6d4fcf3d2 100644 (file)
@@ -3634,26 +3634,23 @@ gtk_style_context_get_margin (GtkStyleContext *context,
                               GtkStateFlags    state,
                               GtkBorder       *margin)
 {
-  int top, start, bottom, end;
-  gboolean rtl;
+  int top, left, bottom, right;
 
   g_return_if_fail (margin != NULL);
   g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
 
-  rtl = (gtk_style_context_get_state (context) & GTK_STATE_FLAG_DIR_RTL);
-
   gtk_style_context_get (context,
                          state,
                          "margin-top", &top,
-                         "margin-start", &start,
+                         "margin-left", &left,
                          "margin-bottom", &bottom,
-                         "margin-end", &end,
+                         "margin-right", &right,
                          NULL);
 
   margin->top = top;
-  margin->left = rtl ? start : end;
+  margin->left = left;
   margin->bottom = bottom;
-  margin->right = rtl ? end : start;
+  margin->right = right;
 }
 
 /**